# $Id: PKGBUILD 84684 2013-02-21 23:18:57Z arodseth $
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Timm Preetz <timm@preetz.us>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>

pkgname=netbeans
pkgver=7.3
_subpkgver=201302132200
pkgrel=1
pkgdesc='IDE for Java, HTML5, PHP, Groovy, C and C++'
arch=('any')
url='http://netbeans.org/'
license=('CDDL')
depends=('java-environment' 'ttf-bitstream-vera' 'libxtst' 'giflib')
makedepends=('gendesk')
optdepends=('php: for developing programs in php'
            'groovy: for developing programs in groovy'
            'lib32-glibc')
install=$pkgname.install
options=(!strip)
# http://dlc.sun.com.edgesuite.net/netbeans/7.3/final/zip/
source=("http://dlc.sun.com.edgesuite.net/$pkgname/$pkgver/final/zip/$pkgname-$pkgver-$_subpkgver.zip")
sha256sums=('0c1fbb318086ecb1cda8393f8f501e887a46af1c492776353e1e162bfd3f0559')

build() {
  cd "$srcdir"

  gendesk -n
}

package() {
  cd "$srcdir/$pkgname"

  mkdir -p "$pkgdir/usr/bin" "$pkgdir/usr/share/applications"
  cp -r "../$pkgname" "$pkgdir/usr/share"
  install -Dm644 "../$pkgname.desktop" \
    "$pkgdir/usr/share/applications/$pkgname.desktop"
  install -Dm644 "nb/$pkgname.png" "$pkgdir/usr/share/pixmaps/$pkgname.png"
  ln -s "/usr/share/$pkgname/bin/$pkgname" "$pkgdir/usr/bin/$pkgname"
  install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

# vim:set ts=2 sw=2 et:
